﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuestionManager.aspx.cs" Inherits="Questionary.Views.QuestionManager"%>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="titlebar">
                <h2>广告列表</h2>
            </div>

                <br />
            <div>
                &nbsp;&nbsp;<input type="button" onclick="javascript:window.location.href='Edit.aspx'" value="新增题目" />
                <br /><br /><br /><br />
                <table width="100%" bgcolor="#efefef">
                <tr>
                    <th width="10%">排序</th>
                    <th>题目</th>
                    <th width="50px">类型</th>
                    <th>选项</th>
                    <th>操作</th>
                </tr>
                    <asp:Repeater ID="rptQuestions" runat="server" OnItemCommand="rptQuestions_ItemCommand">
                         <ItemTemplate>
                             <tr bgcolor="#ffffff">
                                 <td><%#Eval("ID") %><asp:Label ID="aId" runat="server" Visible="false" Text='<%#Eval("ID") %>'></asp:Label></td>
                                 <td><%#Eval("Description") %></td>
                                 <td><%#Eval("QType").Equals(0)? "单选":Eval("QType").Equals(1)?"多选":"主观题"  %></td>
                                 <td><%#((Questionary.Model.QuestionItem)Container.DataItem).GetSelectionText() %></td>
                                 <td>
                                     <input type="button" id="btnEdit" value="编辑" onclick="javascript:window.location.href='Edit.aspx?id=<%#Eval("ID")%>'" />
                                     <asp:Button ID="btnDel" runat="server" Text="删除" OnClientClick="javascript:return confirm('确定删除题目?')" CommandName="DelCmd" />
                                 </td>
                             </tr>
                         </ItemTemplate>
                    </asp:Repeater>
              </table>

            </div>
        <br />


    </div>
    </form>
</body>
</html>
